package com.ssy.lingxi.logistics.entity;

import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 物流单明细实体
 * @author yzc
 * @version 2.0.0
 * @date 2020/7/20
 */
@Data
@Entity
@Table(schema = "public", name = "ls_logistics_order_detail",
        indexes = {@Index(name = "ls_logistics_order_detail_order_id_idx", columnList = "orderId")})
public class LogisticsOrderDetail implements Serializable {

    private static final long serialVersionUID = -2893131175520612036L;
    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "logistics_order_detail_seq")
    @SequenceGenerator(sequenceName = "ls_logistics_order_detail_seq", name = "logistics_order_detail_seq", allocationSize = 1)
    private Long id;

    /**
     * 物流单id
     */
    @Column
    private Long orderId;

    /**
     * 商品id
     */
    @Column
    private Long productId;

    /**
     * 商品名称
     */
    @Column
    private String productName;

    /**
     * 类别名称
     */
    @Column
    private String categoryName;

    /**
     * 品牌名称
     */
    @Column
    private String brandName;

    /**
     * 单位名称
     */
    @Column
    private String unitName;

    /**
     * 数量
     */
    @Column
    private Double amount;

    /**
     * 箱数
     */
    @Column
    private Double carton;

    /**
     * 重量
     */
    @Column
    private Double weight;

    /**
     * 体积
     */
    @Column
    private Double volume;
}
